#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fp_inv()
{
    sm9_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x51,0xc7,0x72,0x2f,0x32,0x57,0x51,0x71,0xd9,0x78,0xc2,0xb9,0x64,0x53,0x09,0x20,0x8c,0x13,0xea,0x0d,0x03,0x69,0xe1,0x6b,0x70,0x08,0x66,0xfe,0x11,0x6e,0x21,0xf0};
    static std::uint8_t c0[32] = {0x81,0xc6,0xb5,0x59,0xc2,0xc3,0x58,0xd6,0xff,0x05,0x90,0x3a,0xbe,0x31,0x43,0x2b,0xca,0x86,0x6b,0xad,0x6e,0x79,0xad,0xa2,0x17,0x75,0x0d,0x6d,0xa2,0xc1,0xa2,0x64};
    sm9_fp_from_bytes(a, a0);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a1[32] = {0x5a,0xfd,0xf2,0xf9,0x32,0x78,0x76,0x82,0x6c,0xd1,0x63,0x95,0x0e,0x58,0x35,0x8e,0x24,0xd5,0x46,0xca,0xe5,0xde,0xd2,0x5d,0x83,0xd8,0xc5,0x55,0xd9,0xe8,0xc6,0x27};
    static std::uint8_t c1[32] = {0x86,0xc3,0xe3,0x4f,0x55,0x21,0x86,0xb6,0xb0,0xe6,0x7e,0x66,0xbf,0xc6,0x9c,0x66,0xb1,0x4b,0x56,0x42,0xc1,0x8a,0x76,0xc1,0x2c,0x7a,0x1f,0xd8,0x08,0xf7,0xa1,0xfb};
    sm9_fp_from_bytes(a, a1);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a2[32] = {0x35,0xc5,0x41,0x1a,0x23,0x90,0x98,0x09,0x97,0x30,0x1c,0x9f,0x53,0x20,0x8e,0xd2,0x16,0xbd,0x67,0xd0,0x9c,0xe4,0xc6,0x3a,0xe4,0x8e,0x92,0xa4,0x3b,0x74,0x82,0x7b};
    static std::uint8_t c2[32] = {0x41,0x78,0xbc,0x2c,0xe2,0x51,0x39,0x17,0x87,0x8e,0xb1,0x5c,0x6e,0x2a,0x80,0xf0,0x39,0x61,0xa2,0x49,0x11,0x49,0xbc,0xaf,0x73,0x6d,0x9e,0x16,0xce,0x32,0x0d,0x33};
    sm9_fp_from_bytes(a, a2);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a3[32] = {0x9e,0x61,0xe9,0x91,0x76,0xec,0x39,0x5a,0x90,0x90,0xce,0x60,0x98,0xe7,0x8c,0x07,0xd5,0x7f,0xe9,0x1c,0x28,0x2b,0x49,0x65,0x99,0x30,0x56,0x2b,0x1a,0x46,0x77,0x53};
    static std::uint8_t c3[32] = {0x97,0x82,0xf9,0xc6,0xd4,0xf7,0x3b,0xed,0xb1,0x61,0xce,0xb8,0x30,0x9f,0xf4,0xc7,0x78,0x99,0x6e,0xc2,0xc2,0x5a,0x66,0x06,0xd3,0x61,0xce,0x03,0x47,0xf0,0xd0,0x5a};
    sm9_fp_from_bytes(a, a3);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a4[32] = {0x2a,0xf4,0x09,0x58,0x9c,0x77,0xc9,0x31,0x60,0x1b,0xce,0x1f,0xa4,0xfb,0x95,0x47,0x66,0x1e,0x23,0x3c,0x49,0xe7,0xca,0x84,0xf6,0xc9,0x42,0xa8,0x31,0xf2,0x88,0x7f};
    static std::uint8_t c4[32] = {0x3c,0x93,0xa8,0x3b,0x14,0x2c,0xef,0xb7,0x29,0xff,0xfa,0xa2,0xad,0xfc,0x39,0xe2,0xd4,0xf3,0x4f,0xbe,0x53,0xf1,0x86,0x67,0x20,0x0d,0xe5,0xe0,0xde,0x34,0x7a,0x23};
    sm9_fp_from_bytes(a, a4);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a5[32] = {0x1f,0xfc,0xb3,0x03,0xd2,0xe1,0x2c,0xa5,0xdf,0x14,0x97,0x6b,0xd4,0x65,0x97,0x98,0x66,0x9e,0x2e,0x81,0x7d,0xfd,0xc3,0x7c,0x30,0x06,0x27,0x7b,0x4c,0x74,0xa9,0xa4};
    static std::uint8_t c5[32] = {0x73,0xd9,0x32,0x5b,0xe4,0x10,0xbb,0xce,0xd9,0x21,0xc6,0x22,0xd8,0x8a,0x03,0xf7,0xa3,0x1e,0x9d,0xc7,0x3d,0xc1,0xd5,0xcc,0xf1,0xad,0x77,0x17,0x6c,0x6f,0x33,0xf4};
    sm9_fp_from_bytes(a, a5);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a6[32] = {0x51,0x0a,0x01,0xa1,0xe8,0x24,0x40,0x67,0x52,0x54,0x72,0x77,0x9d,0x80,0x65,0x00,0x6f,0x8b,0x2a,0xbf,0x0f,0xab,0x76,0x9b,0xbf,0xaf,0x87,0x87,0x34,0x70,0x6c,0xca};
    static std::uint8_t c6[32] = {0x12,0xf0,0x6f,0x10,0x33,0x33,0x39,0x7c,0x62,0xfa,0xe5,0x74,0xb2,0x6f,0x33,0xc1,0x87,0x81,0x8c,0x8b,0x1d,0x3e,0xa0,0xa4,0xd5,0x1a,0x17,0x91,0xa7,0x4d,0x00,0x52};
    sm9_fp_from_bytes(a, a6);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a7[32] = {0x62,0x88,0x96,0xd3,0x3d,0xfa,0x4c,0x6e,0xb8,0xd6,0x5f,0x8e,0x0b,0xa9,0xb8,0x47,0xcf,0xe8,0xe5,0xb6,0x27,0x2e,0x78,0x61,0xfd,0xa7,0x03,0x79,0x13,0x72,0x18,0x03};
    static std::uint8_t c7[32] = {0x45,0xc1,0x17,0x80,0xab,0x92,0x70,0x1b,0xd5,0xe3,0xe3,0xbb,0x95,0x3c,0xa8,0x25,0xa3,0xfa,0x7d,0xe2,0xe4,0xcd,0xc0,0x93,0xcb,0xab,0x38,0x49,0xd0,0xed,0x09,0xf4};
    sm9_fp_from_bytes(a, a7);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a8[32] = {0x65,0x97,0xb8,0xdd,0x67,0xc3,0xed,0x8c,0x98,0x27,0x83,0xd1,0xe3,0xbe,0x72,0xa7,0x79,0xfc,0xc4,0xcf,0xee,0x27,0x5a,0x07,0xbe,0xe1,0x22,0x2d,0x81,0x04,0x74,0xfb};
    static std::uint8_t c8[32] = {0x57,0xc1,0xff,0x47,0xc7,0xbc,0x9f,0x96,0x3d,0xc0,0xd3,0x41,0x13,0xe5,0x2a,0xcd,0x5a,0xbd,0x30,0x5b,0xd7,0x14,0xe7,0x45,0x33,0x64,0x9b,0x97,0xb0,0x77,0x85,0xac};
    sm9_fp_from_bytes(a, a8);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a9[32] = {0x9f,0x4b,0x24,0x86,0xe3,0xfa,0x8f,0x11,0x1c,0x39,0xf8,0x1e,0x95,0x81,0x6a,0x32,0x84,0x0a,0xea,0x06,0x22,0x42,0x09,0xa2,0xb2,0x5a,0x04,0xd3,0x5f,0x01,0xff,0x86};
    static std::uint8_t c9[32] = {0x07,0x5f,0xb8,0x4d,0xdb,0xb3,0x35,0x39,0x60,0x01,0x89,0x90,0xa6,0x4a,0xec,0xfc,0xbe,0x2c,0x51,0x5c,0x03,0xbb,0xc7,0xb6,0x0d,0x45,0x39,0xd7,0xf4,0x9d,0x64,0x89};
    sm9_fp_from_bytes(a, a9);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a10[32] = {0x48,0xcc,0x22,0xd4,0x28,0x5b,0x2a,0xde,0x40,0xfa,0xda,0xcc,0xaf,0xca,0x64,0x1a,0xe0,0x69,0xf6,0x61,0xee,0x1b,0x48,0x1c,0x0c,0x9a,0xaa,0x1f,0xa3,0xb0,0x84,0x72};
    static std::uint8_t c10[32] = {0xae,0x15,0xa3,0x31,0xb2,0x20,0x09,0x22,0x56,0x1f,0x86,0x61,0x95,0xd2,0x9c,0x4f,0xaf,0x2b,0x0c,0x81,0x3d,0x55,0x61,0x57,0x06,0x0f,0x48,0xa6,0xc1,0x52,0x35,0x86};
    sm9_fp_from_bytes(a, a10);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a11[32] = {0x33,0x18,0x06,0xa5,0x0a,0xcb,0xf7,0x67,0x17,0xc9,0x41,0x11,0x6c,0x8e,0xe4,0xcd,0x7c,0x9c,0x51,0xd8,0xe6,0x43,0x5f,0xf2,0xc7,0xe0,0xe9,0xc1,0xc7,0x9d,0xcb,0xca};
    static std::uint8_t c11[32] = {0x02,0x63,0x3f,0xcf,0x60,0x44,0xcb,0xcd,0xb0,0x0a,0xed,0xb4,0xee,0x8a,0xbd,0x11,0xbc,0x47,0xbf,0xfe,0x1f,0xea,0x21,0xc3,0x63,0x52,0xc5,0x42,0x76,0x8a,0xb4,0x1f};
    sm9_fp_from_bytes(a, a11);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a12[32] = {0x1e,0x54,0x46,0x10,0x52,0x82,0x65,0x98,0xb9,0x78,0x36,0x1c,0xd9,0x05,0x70,0x28,0x95,0x63,0x05,0x12,0xf4,0x16,0xc3,0xad,0xb8,0x1a,0xf7,0x73,0x91,0x25,0x63,0x43};
    static std::uint8_t c12[32] = {0xac,0xe0,0x7e,0x81,0x74,0xd5,0xdc,0xb6,0x61,0x49,0x99,0x73,0x49,0x92,0x17,0x7c,0x89,0xe3,0xd6,0x30,0x44,0x4f,0x8a,0xff,0xca,0x74,0xd1,0x13,0x61,0x93,0x45,0x65};
    sm9_fp_from_bytes(a, a12);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a13[32] = {0x16,0x6e,0xd7,0x1c,0xf8,0x0d,0x2f,0xa8,0xe7,0x2a,0x7f,0xfa,0x8f,0x13,0x46,0x06,0xa7,0x8d,0x21,0x47,0xfb,0xee,0xee,0x33,0xc0,0xb9,0x66,0x03,0xcf,0xa8,0xc7,0xa1};
    static std::uint8_t c13[32] = {0xab,0x31,0x0b,0x5c,0x75,0xf7,0x41,0x62,0x90,0x98,0xa7,0x75,0x36,0xdd,0x66,0x94,0x4a,0x77,0xc7,0xe8,0x34,0xe8,0xcf,0xb8,0xc2,0x52,0x78,0x79,0x49,0x90,0x65,0x6c};
    sm9_fp_from_bytes(a, a13);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a14[32] = {0x15,0xd4,0x04,0x7b,0x98,0x0e,0x45,0x4b,0xf2,0x1d,0x2d,0x72,0xec,0x3b,0x96,0x9b,0xa9,0x4b,0x0a,0x86,0xb2,0x84,0x1a,0xab,0xeb,0xe3,0xd6,0x45,0x8c,0x88,0x93,0x91};
    static std::uint8_t c14[32] = {0x4a,0x99,0x3e,0x3e,0x00,0x25,0xaf,0x57,0x76,0x4e,0x27,0x3c,0x2c,0xc2,0x20,0x3b,0x02,0x11,0xb9,0x4f,0x91,0x13,0xce,0x07,0x13,0x00,0xf9,0x8b,0x03,0x51,0x1c,0xf1};
    sm9_fp_from_bytes(a, a14);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a15[32] = {0x9a,0xf9,0x7b,0x0c,0xe1,0x37,0x4b,0x60,0x5c,0x92,0xbf,0x8e,0x74,0x71,0x7a,0x8d,0x6c,0x88,0x5d,0xd8,0xa2,0x17,0x00,0x85,0x3c,0xd6,0xce,0x58,0x7a,0xaa,0x29,0xd5};
    static std::uint8_t c15[32] = {0x4d,0x3f,0x7f,0xd8,0x26,0x7c,0xa6,0x52,0xe1,0xc6,0xd3,0xd0,0xb8,0x93,0x56,0x42,0x72,0x5e,0x93,0x4b,0x86,0x9a,0xb3,0x56,0xeb,0xac,0x18,0x0d,0x67,0x9a,0x22,0xba};
    sm9_fp_from_bytes(a, a15);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a16[32] = {0x2c,0xbc,0x88,0xeb,0xd1,0x7c,0xd6,0xf8,0xa6,0x0b,0x2f,0x4c,0x71,0x4a,0x9f,0xf5,0xbf,0x6f,0x4e,0x65,0xe8,0x5e,0x2b,0x2e,0x68,0x7b,0x5d,0xb5,0x7d,0xe2,0x02,0x0e};
    static std::uint8_t c16[32] = {0x17,0x5c,0x26,0x59,0xef,0xef,0x79,0x7d,0x28,0x54,0x92,0xba,0xb3,0x6b,0xca,0x82,0xbe,0x9f,0xb5,0xe3,0x50,0xd3,0x84,0x2a,0xd9,0x3b,0x63,0x2e,0x4d,0xaa,0xb0,0xc6};
    sm9_fp_from_bytes(a, a16);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a17[32] = {0x82,0x55,0x89,0x11,0xc0,0x5e,0x8c,0x3b,0xf4,0xea,0x40,0x3a,0x60,0xa0,0x79,0x85,0x6e,0x75,0xa0,0xa9,0x22,0x13,0x49,0x14,0x67,0xfa,0x5c,0xcd,0x26,0xad,0x66,0xc7};
    static std::uint8_t c17[32] = {0x21,0xbc,0x97,0x81,0xbc,0xfc,0x45,0x26,0x88,0x40,0x84,0x9c,0x0b,0xc1,0xe3,0x58,0x5a,0x80,0x36,0x49,0xc1,0x00,0x90,0xfb,0x81,0x23,0xe0,0xd7,0xf5,0x75,0xee,0xbb};
    sm9_fp_from_bytes(a, a17);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a18[32] = {0x0d,0xcc,0xc8,0x62,0x45,0xad,0xd9,0x71,0xcd,0xb5,0x1d,0x5f,0x56,0x25,0x63,0x49,0x93,0x46,0x90,0x57,0x39,0x09,0x5f,0xfe,0x9c,0xf0,0xdf,0xb4,0xac,0xd4,0x9a,0x77};
    static std::uint8_t c18[32] = {0xa2,0x9a,0xf9,0x2a,0x90,0x15,0x7a,0x62,0x28,0x55,0x62,0x27,0x9b,0x3e,0xf1,0xab,0x98,0x84,0x4b,0xd5,0xaf,0xc3,0x80,0xd7,0x28,0xc8,0xad,0x0b,0xb3,0x9b,0x37,0xa2};
    sm9_fp_from_bytes(a, a18);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a19[32] = {0x71,0x3a,0x7d,0xbd,0x83,0xa1,0x47,0xcd,0x24,0x65,0x02,0xfe,0xd2,0x3b,0x10,0x65,0x17,0x42,0x1d,0x77,0xc3,0x6e,0x2f,0x82,0x1f,0x4e,0xe8,0x44,0xdd,0xe6,0xb8,0x41};
    static std::uint8_t c19[32] = {0x1a,0xf0,0xdd,0x87,0x5f,0x69,0x09,0xd7,0x80,0x30,0x01,0x1c,0x3a,0x94,0xeb,0xfb,0x75,0x74,0xb4,0x62,0xe5,0x00,0xb2,0x76,0xc9,0xa6,0x62,0x5d,0x38,0xbe,0x08,0xed};
    sm9_fp_from_bytes(a, a19);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a20[32] = {0x59,0xfd,0x81,0x2e,0x83,0x27,0xdc,0x70,0xa6,0x6b,0xc3,0x45,0xf0,0x64,0xa1,0x78,0x4e,0xc4,0x1f,0x62,0x5c,0xde,0x39,0x21,0x41,0x30,0xba,0x69,0x15,0x6a,0x85,0x06};
    static std::uint8_t c20[32] = {0x33,0xaf,0x66,0x66,0x0f,0x75,0x17,0xf1,0x75,0x37,0x3f,0xce,0xb9,0xb5,0xbf,0x3d,0x07,0x9a,0xad,0xd6,0x40,0x55,0x76,0x72,0x94,0xd8,0xd0,0x15,0x2b,0xf0,0x15,0x8b};
    sm9_fp_from_bytes(a, a20);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a21[32] = {0x6d,0x76,0x5a,0x74,0x3e,0xd4,0x4c,0x4d,0xfd,0xc6,0x1b,0x1a,0x9e,0x9c,0xbf,0xb3,0xfc,0x04,0xbf,0x31,0xa9,0xd6,0x35,0x72,0x5d,0x4f,0x9b,0x64,0xe4,0x84,0x53,0xd4};
    static std::uint8_t c21[32] = {0x7b,0x8f,0x66,0x05,0xa1,0xe3,0x5d,0x65,0x41,0x21,0x25,0x60,0xbb,0xca,0xda,0xd7,0x87,0xd5,0x23,0x11,0xa6,0xc1,0x31,0x0e,0xdf,0xba,0xc8,0x56,0x1d,0xfc,0x27,0xef};
    sm9_fp_from_bytes(a, a21);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a22[32] = {0x45,0xc3,0xc9,0x3c,0x5f,0x92,0x2a,0xcc,0x04,0x26,0x3a,0x33,0x08,0xe3,0x4d,0x13,0xe4,0x95,0x65,0x18,0x3a,0x4c,0x24,0x12,0x15,0x90,0xe2,0x1a,0x65,0xd8,0xd7,0xda};
    static std::uint8_t c22[32] = {0x75,0xda,0x32,0x08,0x1f,0x75,0xb3,0x2a,0xed,0x4b,0xd1,0x37,0x41,0xb0,0xba,0x7f,0xd1,0x77,0xaf,0xd9,0x46,0x97,0xa9,0xf9,0xe7,0x7f,0xb6,0x12,0x90,0xcf,0xd9,0xa9};
    sm9_fp_from_bytes(a, a22);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a23[32] = {0x39,0xb1,0x83,0x55,0x98,0xc0,0x7a,0x9b,0xcc,0xc1,0x3a,0xc6,0xe2,0x13,0x9f,0xc4,0x26,0x53,0x07,0xcc,0x05,0x4f,0x95,0xff,0x7d,0x16,0xf0,0xcd,0x15,0xee,0x61,0xf5};
    static std::uint8_t c23[32] = {0x8e,0xf9,0xbe,0x44,0x65,0x0e,0xa7,0x32,0xa7,0x6b,0x38,0xf3,0x50,0xe3,0xdc,0x20,0x4f,0x3a,0x2d,0x0f,0x46,0x46,0x06,0x1e,0x29,0x24,0xbe,0x8a,0x5f,0x1f,0x10,0x79};
    sm9_fp_from_bytes(a, a23);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a24[32] = {0x3d,0xbd,0x0a,0x67,0x0c,0x65,0x00,0x8a,0x7f,0xb4,0x24,0x12,0xf0,0xc9,0x62,0x62,0x41,0xcf,0xfe,0xc0,0xc4,0x5a,0xfd,0x8c,0xd0,0x8d,0x58,0x81,0xdc,0x3e,0x08,0xc8};
    static std::uint8_t c24[32] = {0x36,0x22,0x95,0xc0,0xb1,0xb8,0x19,0x45,0xbf,0x0d,0x30,0x8d,0x15,0x67,0x31,0x84,0x9e,0x77,0x5b,0xac,0x3e,0x5c,0x25,0xf7,0x95,0x1a,0xbf,0xab,0x36,0x4b,0x7d,0x44};
    sm9_fp_from_bytes(a, a24);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a25[32] = {0x26,0x40,0xe4,0x82,0xa6,0x2b,0x5b,0x56,0x49,0xd3,0x38,0x87,0x67,0xb2,0xf6,0xcf,0x3c,0x25,0xaa,0x32,0x57,0xfe,0xaf,0xd9,0x94,0xde,0xe1,0xd4,0x95,0x21,0xcf,0xab};
    static std::uint8_t c25[32] = {0x08,0x75,0x7e,0xa4,0x8a,0x83,0x29,0x11,0xed,0xd9,0xa1,0x80,0xc3,0x43,0xd2,0x44,0x48,0x7d,0x4b,0xd1,0xcf,0x42,0xba,0xd2,0xa8,0x9f,0x30,0x48,0xf9,0x24,0x17,0x45};
    sm9_fp_from_bytes(a, a25);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a26[32] = {0xae,0x01,0x28,0xe6,0xb8,0xd3,0xb3,0x35,0x28,0x22,0xef,0xb9,0xbc,0x77,0x0b,0xaf,0x41,0x59,0xd8,0x31,0xfe,0x0d,0x87,0xd6,0xf6,0xe4,0x5b,0x32,0x19,0xbb,0xbc,0xbd};
    static std::uint8_t c26[32] = {0x9d,0x6c,0x6e,0xbb,0xbb,0x66,0xf4,0xa0,0xb4,0xc3,0xe8,0x84,0xbb,0xae,0xc6,0xa5,0x9c,0xea,0x95,0xaf,0x51,0x58,0x56,0x37,0xf3,0x8f,0xa0,0x47,0x92,0xd7,0xba,0x35};
    sm9_fp_from_bytes(a, a26);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a27[32] = {0x36,0x46,0x0b,0x5e,0x63,0x31,0x7e,0xa0,0xb2,0x94,0x31,0xb2,0x13,0xb5,0x34,0xca,0xc3,0x1a,0x14,0xd4,0x5b,0x51,0x72,0x3d,0x87,0x50,0xe9,0x5d,0xb0,0xb7,0x21,0x90};
    static std::uint8_t c27[32] = {0x79,0x86,0xe6,0xa2,0x76,0xb2,0xf8,0x39,0x10,0x4f,0xdb,0xe0,0xee,0x87,0x09,0xac,0x11,0xb6,0x99,0x0c,0x1b,0x66,0x57,0x84,0x68,0xe6,0x9c,0x92,0x77,0x9c,0x6b,0x8b};
    sm9_fp_from_bytes(a, a27);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a28[32] = {0x49,0x02,0xeb,0xf4,0xaa,0x6b,0xf9,0x41,0xb9,0xa2,0x02,0x56,0x60,0x14,0xd3,0xa5,0xdc,0xb0,0x9a,0x02,0x0b,0xc0,0x2c,0x4c,0x8d,0xb8,0x6f,0x07,0x80,0x49,0xf9,0xef};
    static std::uint8_t c28[32] = {0x72,0xc7,0x16,0x22,0xeb,0xbe,0x64,0x60,0x50,0xd9,0x5a,0xc4,0xf1,0x74,0xfd,0x7d,0x39,0xd2,0x38,0x47,0xa3,0xd2,0xec,0x9f,0xf1,0x77,0x6c,0xbf,0x4b,0x44,0x0a,0x3a};
    sm9_fp_from_bytes(a, a28);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a29[32] = {0x70,0x98,0xd7,0xdc,0xba,0x9b,0x1f,0x58,0x9c,0xd6,0x18,0xc5,0x23,0x2c,0x20,0x8a,0xdb,0xd1,0x73,0xb9,0xfc,0x65,0xdf,0x29,0x5c,0xac,0x59,0xe1,0x1f,0x09,0x01,0xe2};
    static std::uint8_t c29[32] = {0x2d,0xd3,0x77,0x2f,0x2c,0xf6,0x7c,0xea,0x08,0x9f,0xb1,0xa8,0xce,0x07,0x23,0x1c,0xe5,0xa0,0xfc,0x0e,0x07,0xc2,0xbc,0xd0,0xf8,0x87,0x4d,0xf5,0xa1,0x82,0xab,0x1b};
    sm9_fp_from_bytes(a, a29);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a30[32] = {0xa8,0x6d,0x5a,0x37,0xbe,0x3c,0x55,0xaf,0x6d,0x54,0x82,0xb2,0xad,0xae,0x02,0xd0,0x48,0xcc,0xe5,0x86,0x6e,0xd2,0x63,0x46,0x5b,0x3b,0x2d,0xae,0xd6,0xfc,0xef,0xdd};
    static std::uint8_t c30[32] = {0x9b,0x43,0x0d,0x5d,0xb8,0x6c,0xd5,0x2a,0x38,0x99,0x24,0x98,0xe6,0x97,0xa1,0x63,0x86,0x05,0x22,0x9d,0x39,0x77,0xb0,0x03,0xfc,0xa7,0xf9,0x3d,0xb8,0x2c,0xdd,0xa3};
    sm9_fp_from_bytes(a, a30);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a31[32] = {0x03,0x11,0xed,0xed,0x2a,0x3d,0x4a,0x38,0xa6,0xa2,0xa2,0x79,0xd0,0xdd,0xd7,0x3a,0x96,0x7b,0xf9,0x14,0x14,0x33,0xee,0xbf,0xe6,0xf9,0x4c,0x0d,0x49,0x15,0x36,0x4e};
    static std::uint8_t c31[32] = {0xaf,0x1a,0x7e,0xd7,0x21,0x1d,0x70,0x36,0xaf,0x5d,0x8f,0x95,0x0a,0x1a,0x67,0x7c,0x5b,0xcf,0xcd,0x2a,0x6a,0x35,0x9f,0x58,0xe3,0x95,0xbd,0xa4,0x2a,0xc2,0x62,0x48};
    sm9_fp_from_bytes(a, a31);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a32[32] = {0x3d,0x8c,0x36,0x50,0xfa,0x6d,0xde,0x95,0xd7,0xfa,0x18,0xf3,0x44,0xf3,0x99,0x2d,0x3c,0x62,0x34,0xc3,0x35,0x10,0xb1,0xc1,0xc3,0x81,0xba,0xdc,0x85,0x22,0xcc,0x20};
    static std::uint8_t c32[32] = {0x5a,0xfb,0x9f,0x87,0x7b,0xe7,0x2a,0xfe,0xab,0x1f,0xfa,0x82,0x10,0xab,0x3a,0xd1,0xb5,0x89,0x1d,0x21,0x4d,0xfd,0x2c,0x09,0x47,0x9a,0x84,0x6b,0xde,0x1e,0x41,0xe4};
    sm9_fp_from_bytes(a, a32);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a33[32] = {0x0f,0x1c,0xdf,0xc0,0xd6,0xd0,0x01,0x20,0xeb,0x1e,0x6c,0xad,0x2b,0x96,0x5d,0x86,0x10,0xca,0x10,0x38,0xfa,0x12,0xbd,0xcf,0x32,0x64,0x71,0x20,0x2b,0x98,0xea,0xcc};
    static std::uint8_t c33[32] = {0x32,0x6a,0xd3,0xb2,0x24,0xbd,0xfa,0xc1,0x84,0xf1,0x35,0xdc,0xae,0x2f,0x18,0x7f,0x21,0x81,0xf4,0x06,0x95,0x2d,0xbc,0x8c,0x42,0xbd,0x7e,0xa2,0xad,0xaf,0x65,0x1a};
    sm9_fp_from_bytes(a, a33);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a34[32] = {0xa4,0x49,0x7e,0x95,0x09,0xae,0x55,0x96,0xec,0x70,0x75,0x4a,0xb9,0x9b,0x1a,0x25,0x1a,0x59,0xa7,0x1a,0xac,0x7d,0x69,0xfd,0x72,0xb1,0x96,0x15,0x16,0x05,0x3e,0xb7};
    static std::uint8_t c34[32] = {0x7d,0x25,0x29,0x29,0x95,0xe0,0x91,0x7a,0x0d,0x6e,0xb8,0xa4,0x9b,0xf6,0x11,0x03,0x93,0x3f,0xfd,0xd9,0xb0,0xb9,0xf2,0xa7,0x29,0x43,0xd4,0x28,0xe8,0xb7,0x88,0x1d};
    sm9_fp_from_bytes(a, a34);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a35[32] = {0x57,0x00,0x59,0xc2,0x8d,0xf5,0x27,0xad,0x1f,0x80,0xde,0x66,0x8a,0xc4,0x2d,0xf7,0xab,0x54,0x67,0xa8,0x81,0xfa,0xf0,0x11,0xf4,0xcd,0x72,0xb0,0xfd,0xfd,0x56,0xe8};
    static std::uint8_t c35[32] = {0x52,0xe6,0xfe,0x19,0x73,0x02,0xe2,0xfe,0x2f,0x5b,0x5a,0xb9,0x70,0x2a,0xc9,0x3d,0xe6,0x94,0x2b,0xc8,0xfb,0xf7,0xb5,0x4b,0xc2,0x96,0xa0,0x86,0x8d,0x8c,0xfc,0xfb};
    sm9_fp_from_bytes(a, a35);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a36[32] = {0x35,0x19,0x9f,0x4a,0xd7,0x49,0x8d,0x6f,0xe9,0x06,0x68,0xe9,0x3d,0x01,0x1e,0xac,0x39,0xe6,0x2a,0x23,0xb5,0x51,0xa2,0x26,0x40,0x35,0x1a,0x6b,0x98,0x89,0xb2,0x25};
    static std::uint8_t c36[32] = {0x65,0x75,0x99,0x1d,0x45,0x4a,0xc2,0x88,0xb4,0xe8,0x05,0xb8,0x17,0xd7,0x36,0xf0,0x1a,0xa6,0xd3,0x0c,0xac,0xa3,0xbc,0x8d,0xb5,0x9c,0x41,0x13,0x91,0x32,0x6d,0x8d};
    sm9_fp_from_bytes(a, a36);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a37[32] = {0x23,0x5d,0x18,0x44,0x4f,0x7b,0x52,0x6d,0x75,0xc7,0x5c,0x2e,0x59,0xec,0x07,0x8c,0x8b,0x12,0x92,0xa7,0x1e,0x61,0xc1,0x9f,0x33,0x7a,0x1d,0xf4,0xc5,0x99,0x59,0x20};
    static std::uint8_t c37[32] = {0x8f,0xbb,0xa7,0xa2,0x6d,0xcf,0xa6,0x66,0x5c,0x2c,0x2f,0x4f,0xeb,0x66,0xec,0x32,0x31,0xc0,0xa5,0xf4,0x9b,0xab,0x7f,0xe8,0xbe,0x4f,0xd4,0x34,0x09,0x17,0xc8,0x88};
    sm9_fp_from_bytes(a, a37);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a38[32] = {0x76,0x87,0x90,0x93,0xcf,0x59,0xc2,0x39,0xb5,0x8a,0xed,0x18,0xc7,0xdf,0x73,0x5f,0x1f,0xa7,0x99,0xd0,0x1d,0x3a,0x7e,0xf7,0x38,0x7d,0xc8,0xbe,0xd7,0x7e,0x3a,0x1d};
    static std::uint8_t c38[32] = {0x6d,0x32,0x39,0x96,0xc2,0xc8,0xb2,0xb2,0xaa,0xf4,0x10,0x5f,0x2b,0xf5,0xf5,0x9e,0xb9,0x56,0x6f,0x21,0x60,0x49,0x87,0xc3,0x9b,0x30,0x29,0xe5,0x04,0x14,0xe2,0xb2};
    sm9_fp_from_bytes(a, a38);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a39[32] = {0xb4,0x37,0xf6,0x39,0xdc,0x74,0x1a,0x64,0x4a,0x71,0x6b,0x0e,0x71,0x7f,0x10,0x12,0xe6,0x9d,0xef,0x2a,0xe0,0x51,0x20,0xf8,0x0f,0x2a,0x50,0x35,0x53,0x6c,0xdf,0x4f};
    static std::uint8_t c39[32] = {0x53,0xd6,0x86,0x79,0x3e,0x9d,0x72,0x71,0x9c,0x46,0x83,0x31,0xa1,0xd7,0xbf,0xc3,0xe4,0x4f,0x6a,0xf3,0xf1,0x6d,0xe0,0x50,0xff,0x9d,0xcd,0xb5,0x73,0x18,0xa4,0x94};
    sm9_fp_from_bytes(a, a39);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a40[32] = {0x28,0x50,0xdb,0x34,0x9a,0x38,0xf7,0xcd,0xaf,0x8a,0xd7,0x9f,0x20,0x30,0x68,0x29,0x15,0xb0,0xf8,0x06,0x8b,0xe9,0xf2,0xe5,0xa4,0x36,0x9b,0xcf,0x51,0x0c,0x2d,0x81};
    static std::uint8_t c40[32] = {0x77,0x5b,0x31,0x10,0xf5,0x78,0xb0,0xc4,0xa7,0x78,0x1f,0x14,0x65,0x30,0xa0,0x41,0x26,0x55,0x41,0xf7,0x83,0xba,0xb5,0x41,0x07,0x1d,0xec,0x1a,0x8f,0x4b,0xe3,0xca};
    sm9_fp_from_bytes(a, a40);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a41[32] = {0x0c,0x02,0xd1,0xb7,0xa1,0xea,0xcd,0x44,0xf2,0xfe,0xd0,0x84,0x1c,0x4f,0x7f,0x8e,0x7f,0x66,0x94,0x27,0x2e,0x1d,0x99,0xde,0xa3,0xa3,0xbc,0x07,0xb0,0x51,0xc2,0x2d};
    static std::uint8_t c41[32] = {0x73,0x94,0x2e,0x6c,0x61,0x53,0x82,0x18,0xf6,0x3f,0x96,0x9a,0x25,0x6c,0xca,0x50,0x78,0xa2,0x72,0xcd,0x23,0xa0,0x73,0xc8,0xd7,0x6f,0x42,0x1a,0xc5,0x48,0x3e,0x0b};
    sm9_fp_from_bytes(a, a41);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a42[32] = {0x97,0x37,0xdb,0x32,0x90,0x95,0x4b,0xd5,0x4f,0xbe,0x1d,0x69,0x21,0x03,0x4e,0x05,0xef,0x0a,0xba,0xa2,0xab,0x07,0xa6,0x85,0x81,0x6f,0x80,0x55,0x97,0x7b,0x46,0xaf};
    static std::uint8_t c42[32] = {0x11,0x2f,0xaf,0x2e,0x9d,0x34,0xc6,0xf6,0xc5,0xa7,0xa9,0x00,0xc8,0x29,0xc6,0xe6,0xf8,0x48,0x67,0x7d,0x1d,0x5f,0x9b,0xab,0x34,0xf1,0x99,0x33,0xf2,0x43,0x4f,0x0e};
    sm9_fp_from_bytes(a, a42);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a43[32] = {0x02,0xd5,0xba,0x26,0x2e,0xb4,0x38,0xc4,0x5c,0x17,0xc4,0x5b,0xef,0x2e,0x9c,0xb3,0x6e,0x09,0xf7,0xb0,0xa7,0x7b,0x4f,0xe1,0x07,0xae,0x0a,0xd1,0xe1,0x95,0x45,0x62};
    static std::uint8_t c43[32] = {0xb1,0x70,0x95,0x2f,0x2a,0x9a,0x6f,0x03,0x35,0x47,0x34,0xb4,0x16,0xb9,0x61,0xd0,0xd2,0xc3,0x9e,0x9e,0x51,0xcf,0x0b,0x5f,0xbc,0x86,0x9b,0x8d,0x54,0x42,0xb1,0x96};
    sm9_fp_from_bytes(a, a43);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a44[32] = {0x7f,0x69,0xb3,0xfb,0xb4,0x8b,0x0e,0xde,0x30,0x30,0xf5,0x24,0x64,0x02,0x40,0xe2,0x7a,0xfb,0xde,0xa8,0x9d,0xce,0x21,0x55,0x73,0x42,0xdd,0x27,0xfe,0xd7,0x3d,0x0f};
    static std::uint8_t c44[32] = {0x74,0xf1,0xe6,0xe3,0x87,0x36,0x01,0x3e,0x86,0xca,0x15,0xa9,0xec,0x66,0xd6,0xe6,0xbc,0x84,0xae,0x6d,0x44,0x99,0x03,0x3d,0x8c,0x2e,0x60,0x49,0x2b,0x60,0xf3,0x6b};
    sm9_fp_from_bytes(a, a44);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a45[32] = {0x66,0xe1,0xee,0x9e,0xa2,0xaf,0x27,0x70,0xc3,0xe5,0x36,0x87,0xf5,0xa0,0xdc,0xca,0x6f,0x1a,0xd0,0x8d,0x16,0x90,0xef,0x2c,0xe6,0x27,0x5e,0x90,0x02,0x78,0x60,0x32};
    static std::uint8_t c45[32] = {0x69,0x00,0x8e,0x30,0x57,0xd7,0xda,0x20,0xba,0x23,0x41,0x4a,0xfc,0x0b,0x02,0x47,0x16,0xa4,0x71,0xa2,0xb7,0x72,0xbf,0x5c,0xf5,0x99,0xd8,0xcd,0x72,0xfe,0xde,0xea};
    sm9_fp_from_bytes(a, a45);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a46[32] = {0x90,0x3c,0xc3,0xd9,0x6e,0x64,0x94,0xb5,0xe6,0xb8,0x89,0xd8,0x3d,0x28,0xe4,0x32,0x54,0x75,0xe7,0x16,0x50,0x78,0x8c,0xf1,0x81,0xaa,0x32,0xa8,0xe5,0xd2,0x48,0xbb};
    static std::uint8_t c46[32] = {0x6a,0xf0,0xc3,0xab,0xaa,0x89,0x05,0x06,0xe7,0xe5,0xa7,0x59,0x88,0xbb,0x63,0xa2,0x27,0xa5,0x83,0x21,0xb0,0x6c,0x05,0xb7,0x4f,0xf5,0xed,0x3f,0x10,0xf1,0xb6,0xf5};
    sm9_fp_from_bytes(a, a46);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a47[32] = {0x32,0x82,0x5b,0x29,0xee,0xab,0x81,0x75,0x64,0x3b,0xcd,0x99,0xbf,0x13,0x3f,0xd7,0x84,0xd8,0xec,0x6e,0x50,0xf6,0xed,0xe1,0xbb,0x21,0x39,0x92,0x57,0x4a,0x0b,0x47};
    static std::uint8_t c47[32] = {0x4c,0xf1,0xec,0x14,0x1e,0x7e,0x48,0x7a,0x22,0xf5,0xe8,0x1f,0xde,0x3c,0xce,0xe0,0x5c,0xfe,0x37,0x3b,0x69,0xde,0xc2,0xde,0x72,0xd9,0xc1,0x3f,0x15,0x85,0x1d,0x83};
    sm9_fp_from_bytes(a, a47);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a48[32] = {0x0c,0xb0,0x25,0xc0,0xcd,0xdd,0xdf,0x06,0xfc,0xbe,0xe0,0x58,0xc8,0x62,0xaf,0x35,0xb4,0x6b,0xbf,0xe6,0x47,0xa8,0x37,0xe3,0x3e,0x85,0xee,0xf9,0xfb,0x6f,0x6c,0x55};
    static std::uint8_t c48[32] = {0x3d,0x46,0x31,0xc2,0x45,0x0f,0xc8,0xc2,0x7f,0xf0,0x7e,0xa6,0x3c,0x6f,0x79,0xf3,0x2f,0xf3,0x82,0x34,0x70,0x90,0xb5,0xbc,0x94,0x34,0x2c,0xe4,0xc9,0xf0,0x70,0x13};
    sm9_fp_from_bytes(a, a48);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a49[32] = {0x33,0x4e,0x68,0x94,0xb2,0xea,0xb0,0x2b,0xa5,0xbc,0x3f,0x3f,0xe6,0x6d,0x5c,0x04,0x35,0x20,0xfb,0x3c,0xd4,0x4c,0xf4,0xa6,0x77,0xb5,0x01,0x1f,0x25,0xdb,0x61,0x4e};
    static std::uint8_t c49[32] = {0x88,0x1c,0xcb,0xdf,0x3a,0x43,0xa7,0x94,0xca,0x4f,0x50,0xbb,0xaa,0x73,0xee,0xf8,0xef,0xf1,0x6e,0x74,0x43,0x24,0x88,0x9c,0x43,0xfd,0xfd,0x7b,0x39,0x9e,0xe1,0x6c};
    sm9_fp_from_bytes(a, a49);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a50[32] = {0x39,0x09,0xd7,0x5c,0x1f,0x3e,0x31,0xf6,0x50,0x27,0xf2,0x04,0x02,0x6c,0x6a,0x04,0x07,0x94,0xb2,0x8e,0x6a,0x73,0xa5,0x57,0xeb,0xfc,0x73,0x7e,0xd3,0x9e,0xee,0xe3};
    static std::uint8_t c50[32] = {0x7d,0x4e,0x6b,0xdb,0xe5,0xe9,0x0a,0x49,0xb5,0x98,0x9b,0xbd,0x05,0x6a,0x60,0xab,0x62,0xe7,0xf8,0xbd,0x64,0x9d,0x2f,0x6a,0x76,0x0b,0xd3,0x57,0x6c,0x08,0x28,0x66};
    sm9_fp_from_bytes(a, a50);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a51[32] = {0x0d,0x61,0x6c,0xa2,0xb6,0x00,0x65,0x07,0xb0,0xc4,0xad,0xd5,0x7f,0x76,0xf9,0x34,0xe9,0x82,0x76,0x92,0x8e,0xd8,0xd0,0xac,0xa1,0x44,0xd0,0xd2,0xd6,0xb6,0xfa,0x34};
    static std::uint8_t c51[32] = {0x21,0x4e,0x7e,0xbc,0x04,0x01,0x5b,0xc6,0xbb,0x2a,0xa3,0xdb,0x0a,0xbb,0x04,0xc2,0xea,0x06,0x96,0xcb,0x11,0xde,0xa0,0x82,0xcd,0x47,0x1c,0x66,0xc5,0xd5,0x31,0x90};
    sm9_fp_from_bytes(a, a51);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a52[32] = {0x41,0x91,0x30,0x3e,0xc1,0xad,0x89,0x84,0xc8,0x59,0x32,0xe2,0x44,0x47,0xba,0x41,0x3b,0x75,0x29,0xd0,0xa9,0x88,0x40,0x4b,0x21,0x93,0x8f,0x78,0xab,0x83,0x92,0xe2};
    static std::uint8_t c52[32] = {0xab,0x34,0x47,0xb5,0xd6,0x78,0x23,0xb9,0x7d,0xcd,0xe5,0xad,0x35,0x72,0x76,0x95,0x6a,0x5f,0x4d,0xd1,0x5e,0xc9,0xf9,0x7f,0xe0,0x31,0xe7,0x0c,0xe7,0x6d,0xc6,0x44};
    sm9_fp_from_bytes(a, a52);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a53[32] = {0xa5,0x19,0xbb,0xfd,0xc3,0x26,0x31,0xc2,0x32,0x7b,0x17,0xfa,0xa3,0x27,0xab,0x11,0x72,0x92,0xc6,0x12,0xac,0x83,0xfe,0xe6,0x61,0x86,0xad,0x24,0xb0,0x9c,0x65,0x64};
    static std::uint8_t c53[32] = {0x08,0xd6,0x62,0xc8,0xd3,0xa1,0xa4,0xb4,0x3b,0xde,0xcf,0x78,0x1b,0xa6,0x94,0x9f,0xec,0xf8,0x4b,0x21,0x78,0xee,0x4d,0xc5,0xc0,0x3e,0xdb,0x5b,0x25,0x38,0x07,0xef};
    sm9_fp_from_bytes(a, a53);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a54[32] = {0x48,0xf5,0x78,0x01,0x9c,0x6b,0x9f,0x84,0xbb,0x45,0x4f,0x99,0xf9,0x84,0x8e,0x49,0xba,0x61,0x2e,0xd6,0xf4,0x74,0x75,0x3a,0x18,0x90,0x58,0x40,0xdb,0xa4,0x84,0xd5};
    static std::uint8_t c54[32] = {0x5b,0x13,0x00,0x5d,0x7b,0x07,0x55,0x74,0xa9,0x90,0x44,0xb6,0x4f,0xb9,0x4a,0x6d,0xf9,0xac,0x0a,0x1d,0xa7,0x90,0xa0,0x07,0x4d,0x7f,0x8e,0xea,0x55,0xca,0x03,0x69};
    sm9_fp_from_bytes(a, a54);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a55[32] = {0x28,0xf0,0x5a,0x45,0x32,0xb5,0x67,0xfb,0x5a,0x75,0x40,0xdf,0x02,0x4a,0xe8,0xe1,0xff,0xfc,0xac,0xcd,0x58,0xed,0x80,0xc4,0xaa,0xbd,0xa6,0x1f,0x81,0x88,0x1d,0xcd};
    static std::uint8_t c55[32] = {0x00,0x4b,0xb6,0x66,0x0a,0xe8,0xe6,0xa8,0x88,0x81,0x65,0xb9,0xd6,0xf5,0x50,0xd5,0x74,0x5e,0x7e,0x7f,0x66,0xda,0x04,0xe6,0x3e,0xd8,0xa3,0x74,0xe4,0xdb,0x77,0x2c};
    sm9_fp_from_bytes(a, a55);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a56[32] = {0x2a,0x06,0x37,0x7c,0x51,0x37,0x92,0x4a,0x0e,0x40,0x25,0x61,0xce,0x3f,0x31,0x24,0x0e,0xe3,0xa1,0xb9,0xe0,0x45,0x59,0x4f,0x3b,0xc1,0x56,0xd6,0xc2,0x3d,0xd0,0xe1};
    static std::uint8_t c56[32] = {0x47,0x31,0xf3,0x1e,0xb9,0xba,0xf7,0x94,0xce,0xfb,0x45,0x5b,0x81,0xf1,0xd5,0xbf,0x2a,0xc9,0x00,0x26,0x75,0x7c,0x97,0xb4,0x6a,0xbb,0x48,0x7d,0xf5,0x6f,0x86,0x21};
    sm9_fp_from_bytes(a, a56);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a57[32] = {0x39,0x96,0x17,0x7e,0x3f,0xb2,0xc6,0x82,0x3e,0x38,0xd7,0x0c,0x54,0xa8,0x7b,0xca,0x82,0xf5,0xdd,0x65,0xf0,0x17,0xb0,0x9f,0x35,0xc0,0xab,0xa1,0xba,0x59,0x46,0x64};
    static std::uint8_t c57[32] = {0x45,0x4d,0xd9,0xb7,0x65,0xce,0x4b,0x66,0xdf,0xb0,0xbe,0x56,0x0e,0x6c,0x36,0xde,0x7a,0x61,0x34,0x37,0x64,0xe3,0xd2,0xc3,0x62,0x1c,0x05,0x0b,0x38,0x88,0x9a,0x6b};
    sm9_fp_from_bytes(a, a57);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a58[32] = {0x3e,0x94,0x16,0x57,0xa3,0xba,0x87,0x34,0x35,0xfc,0x73,0x15,0xd4,0xa6,0x5b,0x28,0xe6,0xd5,0xbf,0x7f,0x25,0xd8,0x1a,0x77,0xe8,0x9f,0xe7,0x60,0xb2,0xd2,0x93,0x46};
    static std::uint8_t c58[32] = {0x43,0x9a,0x35,0xd5,0xaf,0x31,0x85,0x91,0xc1,0x63,0x3e,0x7e,0xfd,0x4d,0xdc,0x17,0x58,0x60,0x07,0xfb,0x78,0x88,0x0a,0x1c,0xe8,0x52,0xd4,0x44,0x36,0x03,0xc7,0xbb};
    sm9_fp_from_bytes(a, a58);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a59[32] = {0x23,0xc6,0xa3,0x86,0x82,0xe2,0xa4,0xda,0x88,0x98,0x18,0x1d,0x1d,0xc9,0x02,0x6a,0xfd,0x68,0xff,0x4a,0x90,0x64,0x4d,0xf3,0xde,0x36,0x71,0x25,0x23,0xf8,0x89,0x2a};
    static std::uint8_t c59[32] = {0x9f,0x6e,0xd8,0x0e,0xec,0xf4,0x05,0xf1,0xfd,0xdd,0xa3,0x85,0x9c,0x9c,0x84,0xb6,0xea,0xcd,0x62,0x08,0x05,0x07,0x54,0xd9,0x90,0xa3,0xf4,0x06,0x3d,0x5f,0x87,0x5f};
    sm9_fp_from_bytes(a, a59);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a60[32] = {0xa1,0x70,0xd4,0x4a,0x5f,0x5c,0x77,0x7d,0x5a,0x8d,0x47,0xd4,0xac,0xe1,0xb7,0x32,0xec,0x3b,0x96,0xb2,0x1f,0x72,0x1f,0x52,0x3b,0xd1,0x0e,0x82,0x54,0x04,0xe0,0x14};
    static std::uint8_t c60[32] = {0x15,0xca,0x5e,0xe7,0x80,0x98,0x8d,0x39,0xe4,0xc7,0x0e,0x32,0x7b,0x78,0xad,0x69,0xa6,0xfe,0x45,0x95,0xb4,0x73,0xc5,0xf9,0x8e,0x44,0x91,0x25,0x17,0xe7,0x72,0xc7};
    sm9_fp_from_bytes(a, a60);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a61[32] = {0x8f,0x1f,0xa6,0x2c,0xbf,0x5a,0x7c,0x08,0x4c,0x2b,0x60,0x82,0x97,0xbb,0x3d,0x68,0x02,0xfa,0x74,0x2e,0x2c,0x2e,0x4e,0x59,0xdb,0x21,0x22,0xc3,0x22,0x62,0xf1,0xd1};
    static std::uint8_t c61[32] = {0x49,0x0e,0x80,0xab,0xb3,0xad,0xa3,0xa0,0x4d,0xec,0xf2,0xbc,0x8b,0x87,0x95,0xb8,0x32,0xcd,0x36,0x9d,0x8b,0xa9,0xec,0xe3,0x9a,0x54,0xba,0x2b,0x7b,0x34,0x1a,0x4c};
    sm9_fp_from_bytes(a, a61);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a62[32] = {0x37,0xcf,0x8e,0x0c,0x67,0xd3,0xef,0x84,0xac,0x99,0x38,0x91,0x25,0x41,0x3c,0x63,0xf2,0xcc,0xb0,0x1a,0x55,0x67,0x86,0xa0,0xbf,0xf9,0x9a,0xad,0x7c,0x49,0xc9,0x11};
    static std::uint8_t c62[32] = {0x0e,0x95,0x75,0x0b,0x5e,0x2c,0xbd,0xcf,0x4e,0x38,0xf9,0x17,0x51,0xcf,0xaa,0x7b,0xbe,0x6b,0xd2,0xc0,0x08,0x16,0xf5,0x42,0x64,0x4e,0x8a,0x2c,0x23,0x52,0x40,0x96};
    sm9_fp_from_bytes(a, a62);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a63[32] = {0x3a,0x4f,0xa5,0x08,0xd3,0xd4,0xe5,0x4c,0xe0,0xfe,0x5e,0x3c,0xdc,0x98,0xdb,0x7f,0xf0,0xb9,0x40,0x5f,0xa5,0x9d,0x8b,0x1d,0xf9,0xff,0x5a,0xcc,0xa5,0xa1,0x6d,0x07};
    static std::uint8_t c63[32] = {0x25,0x16,0x25,0xaf,0x7f,0x0d,0x0f,0x7f,0x25,0x61,0x7a,0x70,0xf0,0xc0,0xdc,0x3d,0x59,0x14,0xe3,0x6c,0x54,0x17,0xac,0x0a,0x1b,0x65,0x54,0x46,0x7a,0xe7,0xea,0x0c};
    sm9_fp_from_bytes(a, a63);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a64[32] = {0x16,0xf3,0xf9,0x18,0x15,0xbc,0x79,0x57,0xd4,0x8a,0xb7,0x28,0x1f,0x90,0x69,0x11,0x26,0x5d,0xaa,0xeb,0x31,0x2c,0xe9,0x3d,0xb7,0xd6,0xa9,0x6c,0x32,0x58,0xca,0x81};
    static std::uint8_t c64[32] = {0x64,0x74,0x3d,0xed,0x1d,0x4e,0xc1,0xb1,0x68,0x82,0x7e,0xc1,0xe8,0x28,0x70,0x7b,0x10,0x09,0x8d,0xfd,0x02,0xdf,0x31,0x40,0x1d,0x0f,0x48,0x64,0x6b,0x4c,0x20,0x21};
    sm9_fp_from_bytes(a, a64);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a65[32] = {0x19,0x03,0xcb,0x95,0xde,0x5e,0x1a,0x29,0xb0,0x0d,0x72,0xf1,0xb1,0x5f,0xf8,0xf6,0x21,0x9d,0x7f,0xbe,0x8c,0x41,0x4f,0x85,0xb0,0x4b,0x90,0xdb,0x68,0x45,0x14,0x72};
    static std::uint8_t c65[32] = {0x52,0x49,0x26,0xdc,0x6b,0xe0,0xf0,0x79,0x13,0x95,0xf5,0xf1,0x6c,0x7c,0x36,0x36,0x97,0xc3,0xc3,0xe2,0x2b,0xdd,0xa3,0x21,0xee,0x65,0x6c,0x2b,0x85,0x21,0xb8,0x44};
    sm9_fp_from_bytes(a, a65);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a66[32] = {0x36,0x0b,0x20,0xc2,0x45,0x82,0x49,0x3c,0x55,0xbe,0x37,0xd2,0xe7,0x98,0x23,0x2d,0x90,0xa7,0xfe,0xcb,0xf3,0xc2,0x64,0x41,0xe7,0x3d,0x8f,0x01,0x91,0x0a,0xef,0xcf};
    static std::uint8_t c66[32] = {0x34,0xc1,0x47,0x43,0xe5,0x92,0xf1,0xd7,0x5f,0x7d,0xcf,0x40,0x7c,0x83,0xcb,0x17,0x95,0x30,0x33,0x1d,0x9f,0xf8,0x21,0xe6,0x38,0x52,0xa2,0x95,0x39,0x42,0xd5,0x13};
    sm9_fp_from_bytes(a, a66);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a67[32] = {0x67,0x76,0x1d,0xec,0x05,0xf4,0x4f,0x2f,0xdb,0xe1,0x2c,0xa2,0x00,0xc0,0x24,0xb7,0x5e,0x65,0xd9,0x76,0x1d,0x7f,0x28,0x66,0xd0,0x85,0x10,0x0c,0x81,0xe8,0xfd,0x58};
    static std::uint8_t c67[32] = {0x12,0xc4,0xca,0x08,0x52,0x8f,0x0c,0xf9,0xe6,0x91,0x25,0xa1,0xb8,0xa8,0x5c,0xe3,0xa3,0xb7,0xad,0x8f,0xb3,0xe7,0xc5,0x7a,0x50,0xd8,0x3f,0x93,0xb1,0x0f,0x76,0x3e};
    sm9_fp_from_bytes(a, a67);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a68[32] = {0x40,0x35,0x5a,0x9b,0x4f,0x1a,0x40,0x36,0x00,0x45,0x54,0x0e,0x49,0xa6,0x2a,0x9f,0x50,0x1d,0x20,0x91,0x92,0xd5,0x1b,0x4d,0xbe,0x09,0x10,0x0b,0x6b,0x93,0xc5,0xa7};
    static std::uint8_t c68[32] = {0xb6,0x3c,0x9b,0xc6,0xee,0xba,0x6a,0x7a,0xb0,0x1a,0xf7,0xd7,0x91,0xb9,0x57,0x31,0x9a,0x4d,0xa8,0x19,0x0f,0x2d,0x5d,0x22,0xb0,0x01,0x02,0x8d,0x6a,0x33,0xb6,0x83};
    sm9_fp_from_bytes(a, a68);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a69[32] = {0x43,0xde,0x6f,0xae,0x5f,0x1f,0x07,0x65,0x91,0x21,0x10,0x86,0xd0,0x01,0x58,0xe9,0x14,0x58,0xcb,0x5c,0x47,0x84,0x07,0x9d,0x11,0xca,0xa8,0x39,0xb9,0xde,0xf6,0x8b};
    static std::uint8_t c69[32] = {0x21,0x01,0x2e,0x95,0x0b,0x54,0x75,0xfb,0x8b,0x71,0x44,0xe7,0x64,0xe5,0xf7,0x14,0xab,0x9e,0x55,0xb9,0xad,0xbe,0xeb,0xbf,0x3b,0x79,0x1e,0xff,0x10,0x36,0x22,0x82};
    sm9_fp_from_bytes(a, a69);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a70[32] = {0x27,0xda,0x1f,0x08,0x46,0xbf,0x5f,0xb1,0xe1,0x18,0x06,0x2d,0x6d,0x40,0xb8,0x0e,0x54,0xd4,0x7d,0x19,0x9f,0x5d,0x0e,0x6e,0x4d,0x54,0x5b,0x36,0x80,0x64,0x39,0x9d};
    static std::uint8_t c70[32] = {0x3a,0xbd,0x59,0xee,0xba,0x6f,0x87,0x5e,0x81,0xd7,0xa4,0x08,0x4e,0xfc,0xcc,0x7d,0x08,0x80,0x06,0xaf,0xc7,0x82,0x85,0x18,0x56,0x0f,0x87,0x5f,0xce,0xa3,0x85,0x7c};
    sm9_fp_from_bytes(a, a70);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a71[32] = {0x9c,0x78,0x00,0x73,0xd8,0x86,0x1e,0x88,0x01,0x91,0x30,0x99,0xd8,0x3e,0x02,0xc4,0xde,0x18,0x1f,0xb7,0xc5,0xbd,0x06,0x65,0x83,0xf3,0x76,0x73,0x1d,0x6d,0x75,0x5c};
    static std::uint8_t c71[32] = {0x31,0x48,0x5e,0xf9,0xc3,0x21,0x1e,0xcb,0xac,0xa9,0xb7,0x72,0xd3,0xfc,0xf1,0x68,0xcc,0x42,0x78,0xb1,0x3e,0x4d,0xc2,0x7a,0xe0,0x72,0x99,0x73,0x64,0x1a,0xf6,0x10};
    sm9_fp_from_bytes(a, a71);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a72[32] = {0x41,0xaf,0xcd,0x80,0x89,0xe6,0xa9,0xf1,0xcb,0x2a,0x02,0x0c,0xed,0x0a,0xc1,0x5f,0x49,0x2c,0x0e,0x42,0xa7,0x35,0xb3,0x0f,0x78,0x52,0xdf,0x71,0x84,0xef,0xb5,0x83};
    static std::uint8_t c72[32] = {0x27,0x75,0xd7,0xa9,0xfa,0x5c,0x14,0x3d,0x7d,0x00,0x4c,0x59,0x4f,0x44,0x4a,0x81,0x02,0xb6,0x71,0x70,0xfb,0x19,0x87,0x1d,0x09,0x55,0xa5,0xe2,0x02,0xea,0x16,0x35};
    sm9_fp_from_bytes(a, a72);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a73[32] = {0x8a,0x50,0x3c,0x23,0x38,0xfa,0x59,0x22,0x45,0x9b,0x77,0xc9,0x53,0xe3,0xe7,0x3e,0x51,0x91,0xd5,0x08,0xdb,0x6f,0x35,0x5b,0x7c,0x3b,0xee,0xc7,0x0f,0xe1,0x40,0x53};
    static std::uint8_t c73[32] = {0x6f,0xd4,0x35,0x8e,0xe8,0xc9,0xf9,0xfb,0x9d,0x09,0x7a,0x45,0x9f,0x0a,0xbf,0xf2,0x2c,0x94,0x41,0xf6,0x12,0x22,0x75,0x25,0xa3,0xd6,0xde,0xf9,0x23,0xda,0xce,0x17};
    sm9_fp_from_bytes(a, a73);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a74[32] = {0x22,0x44,0x3b,0xbf,0x4b,0x5d,0x1d,0x89,0x74,0xaa,0xb1,0x91,0x60,0xfb,0x11,0xac,0x99,0xd3,0xe6,0x94,0x3e,0x4e,0xef,0x54,0xf7,0x15,0xcf,0x35,0x96,0xb7,0x2c,0xf3};
    static std::uint8_t c74[32] = {0x17,0x9e,0xff,0xcf,0xde,0xa0,0x3e,0x58,0x39,0x69,0x4a,0xef,0x4e,0xea,0xaa,0x3a,0x2a,0x0e,0x28,0x25,0xfa,0x37,0x0b,0x2b,0x86,0x3f,0x49,0xb0,0xe7,0xba,0x59,0xa6};
    sm9_fp_from_bytes(a, a74);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a75[32] = {0x10,0x09,0x9b,0x7f,0x27,0xcd,0xf3,0x63,0xcb,0x37,0xf1,0x80,0xd5,0x9d,0x37,0x9a,0x66,0x81,0x53,0xed,0x41,0xee,0x92,0xe9,0x45,0xfc,0xa0,0xb4,0x12,0x2f,0x9c,0xb4};
    static std::uint8_t c75[32] = {0x3e,0xff,0xce,0x34,0x51,0x7b,0x2a,0x6d,0x8b,0xcb,0x87,0x09,0x92,0x9f,0x16,0x88,0x28,0x21,0x50,0x1a,0x32,0xed,0x0b,0x9c,0xda,0xe1,0x91,0x97,0x1c,0x52,0x97,0xdd};
    sm9_fp_from_bytes(a, a75);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a76[32] = {0x45,0x1c,0x78,0x58,0x6b,0x3f,0xdb,0xc1,0x63,0x17,0x74,0xd0,0x3b,0x01,0xd9,0x9b,0x0e,0x25,0xd0,0xaf,0xd2,0xad,0xe3,0x11,0xfb,0x94,0x20,0x64,0x8c,0xd5,0x16,0x24};
    static std::uint8_t c76[32] = {0x33,0x05,0x17,0x4b,0xf0,0x09,0xd7,0xd0,0x91,0x7a,0x52,0xa3,0xa7,0xb0,0x86,0xbd,0xa1,0xea,0x1f,0xdf,0xfe,0x9b,0x8a,0xa1,0x88,0x08,0xcc,0x1b,0xac,0x97,0x75,0xaa};
    sm9_fp_from_bytes(a, a76);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a77[32] = {0x43,0x93,0x70,0x7d,0xe8,0x95,0x7e,0x43,0xad,0x24,0x34,0x0d,0xc2,0x58,0x79,0x33,0x2a,0xf6,0xea,0x15,0x2e,0xcc,0xfb,0xc0,0x27,0x22,0xbb,0x3d,0xdd,0x4e,0x49,0xff};
    static std::uint8_t c77[32] = {0x5e,0x71,0x6d,0xdd,0x3b,0xed,0xb7,0x53,0x96,0xb7,0x9a,0xb1,0xcd,0x97,0xb6,0xe7,0x4f,0x31,0x3a,0x53,0xcd,0x35,0xf0,0xa3,0x7e,0xe6,0x3f,0x04,0x94,0xc0,0x3d,0xb2};
    sm9_fp_from_bytes(a, a77);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a78[32] = {0x87,0x3c,0x3a,0x86,0x67,0x62,0x31,0x8c,0x05,0xc7,0xaf,0x6d,0x2e,0x36,0x32,0xaf,0xd6,0xf9,0x65,0xdf,0xd3,0xca,0x86,0xff,0x17,0xcb,0x0b,0x53,0x40,0x32,0x03,0x2d};
    static std::uint8_t c78[32] = {0x58,0x55,0x83,0xec,0x10,0xf8,0xfb,0xbe,0x1e,0xc1,0x49,0xe8,0x86,0x39,0x48,0x1e,0xd2,0x26,0x84,0xf7,0x4d,0xa2,0xe2,0xac,0x6f,0xca,0x26,0x76,0x90,0x2e,0xe8,0x67};
    sm9_fp_from_bytes(a, a78);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a79[32] = {0xa1,0x7e,0xe5,0x69,0x02,0x5a,0x63,0xdd,0x3e,0xf5,0xe7,0xf3,0x14,0xa1,0x81,0x3e,0x93,0xe9,0x4d,0x19,0xfd,0x00,0xfe,0xc7,0x21,0x44,0x18,0x4f,0xca,0xcf,0x2c,0x44};
    static std::uint8_t c79[32] = {0x86,0x8c,0xfd,0x6c,0x62,0xee,0x3d,0xd8,0x29,0x5f,0xfa,0x64,0x3d,0x4c,0xf3,0x82,0x81,0x23,0x1a,0xe8,0x31,0x74,0x05,0xdd,0x96,0xe2,0x83,0x9d,0xc3,0x1f,0xa3,0x9b};
    sm9_fp_from_bytes(a, a79);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a80[32] = {0x08,0xe5,0x95,0x51,0xe9,0xab,0x4c,0x0d,0x5c,0xf1,0x94,0x0f,0xde,0xfd,0xd0,0x10,0x54,0xe0,0x6d,0xd9,0x01,0x42,0xb8,0xd8,0x80,0xc3,0x58,0xa1,0x11,0xf0,0xa9,0xb2};
    static std::uint8_t c80[32] = {0x17,0x92,0xd4,0xae,0x36,0x34,0xa7,0x58,0x25,0xca,0x96,0x22,0x11,0x43,0xe3,0xdb,0x0a,0xd0,0x41,0xe9,0x30,0x76,0x9f,0x0f,0xb2,0xd3,0x0b,0xf9,0x74,0x66,0x6a,0x9a};
    sm9_fp_from_bytes(a, a80);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a81[32] = {0x73,0x9e,0x96,0x26,0x69,0x2a,0xd2,0x5c,0x5f,0x69,0x14,0xa2,0x35,0x9f,0x00,0xf0,0x28,0x02,0x9d,0x73,0x2b,0x49,0x0c,0x60,0x71,0x80,0xd5,0x34,0x16,0x15,0x87,0x15};
    static std::uint8_t c81[32] = {0xaa,0x41,0xd6,0x93,0x1d,0x6a,0x92,0x8e,0x6d,0xa6,0xbf,0x91,0xae,0x02,0x6c,0x32,0xa7,0x73,0x6f,0x31,0x3f,0xda,0x6b,0xe1,0x6a,0x6d,0x28,0x57,0x09,0xf6,0xc0,0x2e};
    sm9_fp_from_bytes(a, a81);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a82[32] = {0x96,0x92,0xa3,0x21,0x5f,0xb1,0x0a,0x44,0x04,0xea,0xb8,0x99,0xcd,0x33,0x64,0xc5,0x5e,0x69,0x4f,0x8d,0x4a,0x3b,0xe8,0xaa,0x84,0x59,0x02,0xb9,0x21,0x6e,0x06,0xce};
    static std::uint8_t c82[32] = {0xb0,0x99,0x91,0xf1,0x72,0x12,0xdc,0x58,0x27,0xb1,0x8b,0xac,0x56,0xe2,0xa6,0x51,0x7b,0x49,0xd8,0xe2,0xfb,0xd7,0x97,0xf2,0x95,0xd0,0x7f,0xa4,0x8c,0xcb,0xfd,0xef};
    sm9_fp_from_bytes(a, a82);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a83[32] = {0x73,0x19,0x7b,0xbc,0x15,0x4a,0x7b,0xf2,0x91,0xa3,0xb0,0xae,0x5f,0xb3,0xa5,0x86,0x5b,0xba,0x4f,0x5c,0xf7,0x83,0x56,0xea,0xaa,0xfa,0x19,0xa0,0x22,0x00,0x52,0xc5};
    static std::uint8_t c83[32] = {0xb1,0xf4,0xd6,0x0f,0x34,0x8b,0x89,0xf4,0x26,0xa2,0xc3,0xe7,0x3f,0xa6,0x0f,0x83,0xcf,0x95,0xbc,0x7d,0x4e,0xbf,0x6a,0x02,0xc5,0x6d,0xca,0x52,0xa6,0xa7,0xd6,0xf4};
    sm9_fp_from_bytes(a, a83);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a84[32] = {0x39,0x42,0xe0,0x35,0x84,0xc2,0xac,0xc6,0x1a,0x36,0x64,0x54,0x9e,0x12,0x72,0xf7,0x69,0x6c,0xc2,0x45,0x94,0xe2,0x72,0xd8,0x8b,0x01,0xed,0xa5,0x4b,0xf4,0xc0,0xbd};
    static std::uint8_t c84[32] = {0xb1,0xa8,0x4d,0xaa,0x95,0x88,0x10,0x07,0x95,0x1d,0xc5,0x7d,0x5b,0x02,0x70,0xfe,0xb6,0x07,0xe3,0x69,0x03,0x20,0x75,0x62,0x01,0x6d,0x1a,0x6b,0x3b,0x1d,0xb9,0xb0};
    sm9_fp_from_bytes(a, a84);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a85[32] = {0x1c,0x73,0xdd,0x28,0x7d,0x54,0x11,0x0f,0xe7,0xf4,0x2b,0xe7,0x5c,0xaf,0xa8,0xb4,0x42,0x64,0x30,0x1b,0xa3,0xaf,0x8b,0x26,0xcd,0x87,0x5d,0x70,0x1a,0x12,0xd2,0xbd};
    static std::uint8_t c85[32] = {0x77,0xf3,0x65,0x52,0x7d,0x52,0x84,0xac,0x27,0x1a,0x85,0x2c,0x6c,0xd1,0x57,0x6b,0x91,0xb8,0xef,0x99,0x0e,0xea,0x9e,0xfc,0xb4,0x8d,0x26,0x84,0x47,0x8a,0xbe,0xe2};
    sm9_fp_from_bytes(a, a85);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a86[32] = {0x2d,0x71,0xef,0x7e,0x1b,0x3c,0xab,0x7e,0xe0,0xe0,0x11,0xf6,0x96,0x2c,0xfa,0x1d,0xbe,0x4e,0x99,0x78,0x45,0xe2,0x5a,0x20,0xd6,0x23,0x44,0xa8,0x20,0x94,0x16,0x19};
    static std::uint8_t c86[32] = {0x9e,0xfc,0xba,0x68,0x25,0x6a,0x09,0xeb,0x92,0x5e,0x93,0x94,0x14,0xa8,0x50,0x5e,0xc0,0xc8,0x2e,0xf2,0x82,0xee,0xf1,0x57,0xb2,0x60,0xa0,0xcf,0x21,0xdd,0x87,0xdc};
    sm9_fp_from_bytes(a, a86);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a87[32] = {0x65,0x24,0x61,0x75,0x79,0xcf,0x8d,0x53,0xbb,0x43,0xd5,0x65,0x82,0xf6,0x06,0x22,0x5e,0x98,0xdb,0xf5,0x24,0xaf,0xd8,0x1f,0xa6,0x94,0x7c,0x54,0xfe,0x4f,0x2d,0xb8};
    static std::uint8_t c87[32] = {0x20,0x31,0x78,0x4d,0x54,0x8a,0x22,0xb8,0x0a,0x8c,0x80,0x12,0x00,0x34,0xfe,0xea,0x3a,0x2e,0x61,0x28,0x51,0x34,0x3a,0x3c,0x76,0x06,0x1f,0x64,0x7a,0x11,0xd8,0xcc};
    sm9_fp_from_bytes(a, a87);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a88[32] = {0x0b,0x46,0xfa,0x37,0xaf,0xe6,0x52,0x0d,0xdb,0x88,0x45,0xc0,0x6d,0xb0,0x67,0xe6,0x7c,0x55,0x00,0x50,0x73,0x2f,0x88,0x72,0xf6,0x42,0xd6,0x39,0x98,0x8a,0x0c,0x66};
    static std::uint8_t c88[32] = {0x84,0x74,0x31,0x97,0x76,0x7d,0x6d,0x83,0x1f,0xb6,0x3a,0xd4,0x21,0x1b,0x03,0x91,0xa0,0x8c,0xf6,0xea,0xff,0xa8,0xaf,0x74,0xa7,0xcf,0xab,0x91,0xbb,0x93,0xc0,0xf0};
    sm9_fp_from_bytes(a, a88);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a89[32] = {0x02,0x4a,0x97,0xfa,0x02,0xe2,0xe7,0xae,0xf9,0x8b,0x8a,0x70,0x76,0x90,0x80,0xac,0x38,0x80,0xd4,0xd2,0x78,0x2d,0x32,0xce,0x6a,0xc8,0xb9,0xa4,0x17,0x13,0xe4,0x31};
    static std::uint8_t c89[32] = {0x14,0xc9,0xc4,0x1a,0x28,0x8d,0xe5,0x77,0x49,0x59,0x04,0x64,0x3b,0xa3,0x01,0xf7,0x7d,0xd0,0x1b,0x85,0x39,0x64,0x33,0x8a,0x22,0x81,0x42,0xf1,0xfa,0xfb,0x85,0xb6};
    sm9_fp_from_bytes(a, a89);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a90[32] = {0x68,0xfd,0xd6,0x83,0xe0,0x8e,0x46,0x93,0x4c,0x9e,0x5b,0x49,0x35,0x12,0x60,0x22,0x20,0x79,0x3d,0xaa,0x29,0x65,0x93,0x0d,0x8f,0x49,0x6a,0x10,0x96,0xb5,0x0f,0x26};
    static std::uint8_t c90[32] = {0x2c,0x30,0x1b,0xf0,0x82,0x4c,0x8c,0x8b,0x99,0x2c,0x54,0xb9,0x64,0xbf,0x46,0x41,0xcb,0x07,0xf9,0xe9,0xb1,0x51,0x51,0xc5,0x4e,0x68,0x2c,0x1e,0x1e,0x4d,0xf9,0xa9};
    sm9_fp_from_bytes(a, a90);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a91[32] = {0x23,0x92,0xcc,0x4c,0xc0,0xe1,0x98,0x54,0x65,0x40,0x5a,0x5d,0xe3,0xd6,0xf5,0x7a,0xdb,0x65,0x3a,0x89,0x31,0x0e,0x7b,0x2d,0x86,0xec,0x14,0x54,0xab,0x3d,0x2e,0xe9};
    static std::uint8_t c91[32] = {0xb1,0x3a,0xaf,0x71,0xec,0xf0,0x18,0x62,0xbf,0xcf,0x03,0x18,0x87,0x1c,0xc5,0x54,0x1d,0xe4,0xa3,0xf3,0x5d,0x0e,0x12,0xf3,0xde,0x01,0x54,0x3a,0xcc,0xdc,0x54,0x44};
    sm9_fp_from_bytes(a, a91);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a92[32] = {0x57,0x78,0x86,0x84,0x43,0x7b,0xcd,0xaf,0x06,0xed,0x0e,0xc4,0x9d,0x0b,0xb1,0xa5,0x1a,0xc7,0x02,0x7b,0x28,0x34,0x00,0x9a,0x64,0x97,0xf2,0xf5,0x32,0xb9,0xb4,0x1e};
    static std::uint8_t c92[32] = {0x16,0x5d,0x13,0xd0,0xb7,0x89,0x7d,0xeb,0x60,0xd5,0x31,0x8a,0x72,0x96,0x80,0xa3,0xde,0xc2,0xca,0xf8,0x64,0xe6,0xbc,0x54,0x63,0x19,0x56,0xfb,0x4a,0x5e,0xa0,0xbb};
    sm9_fp_from_bytes(a, a92);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a93[32] = {0x57,0x7b,0x27,0x7b,0x34,0xe8,0x13,0x68,0xac,0x1d,0x0d,0x35,0xaa,0x86,0xb5,0x2f,0x22,0xa4,0x1f,0xe0,0x2f,0xfc,0xbc,0x85,0xf7,0xa5,0x4f,0x7c,0xd3,0x98,0x12,0xa1};
    static std::uint8_t c93[32] = {0x56,0xd6,0x93,0xb6,0x0f,0xe8,0xe8,0xd5,0xfa,0xb5,0x21,0xdf,0xd7,0xb9,0xf6,0x5d,0x71,0x47,0x85,0x7c,0xe3,0xd5,0xff,0x41,0x09,0x1a,0xa4,0xc4,0xa7,0x42,0x48,0x91};
    sm9_fp_from_bytes(a, a93);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a94[32] = {0x35,0xdf,0x18,0xa0,0x8a,0xf5,0x3d,0x76,0xd9,0x71,0x67,0xe8,0xd1,0xfb,0x99,0xfa,0xbe,0x95,0xc0,0xbd,0x30,0x53,0xc7,0x4d,0xd7,0xb6,0x94,0x3b,0x44,0xc4,0x38,0x79};
    static std::uint8_t c94[32] = {0xaf,0xa5,0x61,0x65,0x34,0xff,0x87,0x7c,0x4d,0xfa,0xf2,0xf5,0x32,0x2e,0xa7,0x0d,0x22,0xe7,0x4f,0x0c,0x5e,0x54,0xad,0xcf,0xc2,0x0b,0x75,0xaa,0xa0,0xfb,0x7b,0x2c};
    sm9_fp_from_bytes(a, a94);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a95[32] = {0x31,0xe6,0xac,0xdc,0x0b,0x44,0xc2,0xe8,0x99,0x21,0x92,0x4f,0x7f,0x2e,0xe6,0x8a,0x00,0xab,0x65,0x1b,0x5a,0x8f,0x77,0x07,0xb0,0x6c,0x85,0x74,0xd0,0x10,0x01,0xcf};
    static std::uint8_t c95[32] = {0xac,0xc0,0xf0,0x78,0x9f,0x5c,0x9b,0x13,0x61,0xd7,0xd6,0x1f,0x64,0x0d,0xae,0xe4,0xb4,0xd6,0x20,0xe0,0x1b,0x2b,0xc9,0x4b,0xcc,0x6f,0x57,0x66,0x29,0x44,0xe5,0x92};
    sm9_fp_from_bytes(a, a95);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a96[32] = {0x41,0x1d,0x23,0x99,0xb7,0xf9,0x42,0xfe,0xc3,0x9a,0x8b,0x82,0x11,0x22,0xea,0xc4,0xad,0x7a,0x1a,0xb0,0x36,0xad,0xc9,0x67,0xc0,0xaa,0xf2,0x1c,0xcc,0x92,0x78,0x96};
    static std::uint8_t c96[32] = {0x0d,0x9e,0x93,0x10,0x7b,0xb4,0x0f,0x48,0x62,0x2a,0x4a,0xbc,0x98,0x09,0xdf,0xaa,0x2e,0x06,0xad,0x33,0xe0,0x09,0x1a,0x40,0xaf,0xea,0x7e,0xc9,0x13,0xc9,0x8f,0xc0};
    sm9_fp_from_bytes(a, a96);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a97[32] = {0x5a,0xea,0xac,0x3f,0xee,0x81,0xb6,0x0f,0xa3,0x84,0xdb,0x76,0x7e,0xdf,0x49,0xe5,0x2b,0x07,0x61,0xb9,0xa2,0x83,0x42,0x69,0x4a,0x8b,0x7f,0x84,0x76,0x59,0x92,0x14};
    static std::uint8_t c97[32] = {0x69,0xf4,0x01,0x36,0x06,0xf8,0x87,0xc7,0x0d,0xe7,0xb9,0x00,0x92,0xf9,0xa9,0x65,0xcc,0x20,0x28,0xed,0x58,0xa5,0xe7,0xe1,0x0a,0x74,0xa8,0x31,0x12,0xd1,0x53,0x62};
    sm9_fp_from_bytes(a, a97);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a98[32] = {0xae,0x65,0xc1,0x1b,0xb8,0x20,0xe3,0x2d,0x9c,0x88,0x78,0x01,0x03,0x9d,0x6c,0x57,0xf9,0xa2,0xd9,0x89,0xb5,0x64,0xaf,0xa9,0xf4,0xfc,0x2f,0x14,0x09,0x27,0x20,0x99};
    static std::uint8_t c98[32] = {0x92,0x91,0x54,0x76,0x56,0xac,0x97,0x91,0x8d,0xf0,0x89,0xce,0x6a,0x81,0xe4,0xbc,0xfd,0xa6,0x29,0x02,0xe9,0xcf,0x1c,0x11,0x1f,0x9a,0x93,0xe4,0x31,0x0b,0xeb,0xe9};
    sm9_fp_from_bytes(a, a98);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
    static std::uint8_t a99[32] = {0x84,0x4d,0xef,0x87,0xe4,0x6a,0xee,0xe7,0x45,0x52,0xec,0xcf,0x70,0x4b,0xd0,0x32,0x44,0x23,0xf8,0x6b,0x6f,0xcc,0x33,0xef,0x26,0x67,0x92,0x7b,0x99,0xa0,0x10,0x73};
    static std::uint8_t c99[32] = {0x0f,0x54,0xa9,0xb7,0x26,0xab,0x3f,0x33,0xe9,0xfb,0x3d,0x2d,0xac,0x6e,0xd7,0xef,0xe0,0x5b,0xa0,0x64,0xe6,0x43,0x4f,0xf9,0x83,0x24,0xe1,0xd3,0xe7,0x07,0x9c,0xc8};
    sm9_fp_from_bytes(a, a99);
    sm9_fp_inv(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_inv");
    }
}